{extend name="../../admin/view/main"}

{block name="button"}
{/block}

{block name="content"}
<div class="think-box-shadow table-block">
    {include file='order/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th width="180px" class='text-left nowrap'>订单编号</th>
            <th width="180px" class='text-left nowrap'>产品信息</th>
            <th width="180px" class='text-left nowrap'>订单状态</th>
            <th width="180px" class='text-left nowrap'>实付价</th>
            <th width="180px" class='text-left nowrap'>顾客类型</th>
            <th width="180px" class='text-left nowrap'>顾客姓名</th>
            <th width="180px" class='text-left nowrap'>顾客手机号</th>
            <th width="180px" class='text-left nowrap'>支付方式</th>
            <th width="180px" class='text-left nowrap'>支付时间</th>
            <th class="nowrap">操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.top_id}' type='checkbox'></label>
            </td>
            <td class='text-left nowrap'>
                {$vo.top_no}
            </td>
            <td class='text-left nowrap relative layui-elip'>
                <div class="inline-block">
                    产品名：<br/>
                    规格：
                </div>
            </td>
            <td class='text-left nowrap'>
                <span class="layui-badge layui-bg-green">{$order_status[$vo['pay_status']]}</span>
            </td>
            <td class='text-left nowrap'>
                {$vo.real_pay}
            </td>
            <td class='text-left nowrap'>
                    {$vo.stu_type}
            </td>
            <td class='text-left nowrap'>
                {$vo.stu_name}
            </td>
            <td class='text-left nowrap'>
                {$vo.stu_mobile}
            </td>
            <td class='text-left nowrap'>
                {$vo.pay_type|getPayName}
            </td>
            <td class='text-left nowrap'>
                {$vo.pay_time|format_datetime|str_replace=' ','<br>时间：',###|raw}
            </td>
            <td class="nowrap">
                {if auth('orderDetail')}
                <a class="layui-btn layui-btn-sm" data-title="查看详情" data-modal="{:url('Order/orderDetail',array('id'=>$vo.top_id))}">查看详情</a>
                {/if}
                {if auth('sendGoods') and $vo.pay_status eq 2}
                <a class="layui-btn layui-btn-sm" data-title="发货" data-modal='{:url("sendGoods")}?top_id={$vo.top_id}'>发货</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>
{/block}
{block name='script'}
<script>
</script>
{/block}
